package com.moarea.app.controller.common;

import com.moarea.app.lang.model.ResultObject;
import com.moarea.app.service.inter.common.ICommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * 公共controller
 * <p>
 * jizhong
 * <p>
 * 2017-11-03
 */
@RestController
@RequestMapping(value = "/common")
public class CommonController {

    @Autowired
    private ICommonService commonService;

    /**
     * 获取最新的BillNo
     *
     * @param param 参数
     *              参数需要
     *              AID --> 编号名称
     * @return 单号
     */
    @ResponseBody
    @RequestMapping(value = "/obtainBillNo", method = RequestMethod.POST, headers = {"Accept=application/json"})
    public ResultObject obtainBillNo(@RequestBody Map<String, Object> param) {
        return commonService.obtainBillNo(param);
    }


}
